package com.xdtech.cc.vo;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.Date;
import java.util.List;
import java.sql.Timestamp;

import com.xdtech.core.model.BaseItem;
import com.xdtech.core.orm.utils.BeanUtils;
import com.xdtech.cc.model.Account;

import com.xdtech.web.freemark.item.GridColumn;

/**
 * 
 * @author max.zheng
 * @create 2016-05-29 21:53:30
 * @since 1.0
 * @see
 */
public class AccountItem extends BaseItem implements Serializable{
	private static final long serialVersionUID = 1L;
	private Long id;
	@GridColumn(title="客户名字",width=100)
	private String accountName;
	@GridColumn(title="银行",width=100)
	private String blankType;
	@GridColumn(title="信用卡额度",width=100)
	private Double creditLimit;
	@GridColumn(title="还款额度",width=100)
	private Double repaymentAmount;
	@GridColumn(title="账单额度",width=100)
	private Double billAmount;
	@GridColumn(title="客户本金",width=100)
	private Double customerPrincipal;
	@GridColumn(title="账单日",width=100)
	private String billDay;
	@GridColumn(title="还款日",width=100)
	private String repaymentDay;
	@GridColumn(title="交易密码",width=100)
	private String tradePwd;
	@GridColumn(title="查询密码",width=100)
	private String queryPwd;
//	@GridColumn(title="手续费点数",width=100)
//	private Double handlingFeePoint;
//	@GridColumn(title="费用收取日期",width=100)
//	private String chargeDate;
//	@GridColumn(title="商户名称",width=100)
//	private String merchantName;
//	@GridColumn(title="商户扣率",width=100)
//	private Double merchantFee;
//	@GridColumn(title="刷卡笔数",width=100)
//	private Integer payCardCount;
//	@GridColumn(title="手续费",width=100)
//	private Double handlingFee;
//	@GridColumn(title="刷卡金额",width=100)
//	private Double payCardAmount;
//	@GridColumn(title="到账金额",width=100)
//	private Double arrivalAmount;
//	@GridColumn(title="刷卡时间",width=100)
//	private String payCardTime;
//	@GridColumn(title="到账时间",width=100)
//	private String arrivalAmountTime;
//	@GridColumn(title="到账卡",width=100)
//	private String arrivalAmountCard;

	public void setId(Long id) {
		this.id = id;
		addQuerys("id", id);
	}
	public Long getId() {
		return id;
	}
	
	public void setAccountName(String accountName) {
		this.accountName = accountName;
		addQuerys("accountName", accountName);
	}
	public String getAccountName() {
		return accountName;
	}
	
	public void setBlankType(String blankType) {
		this.blankType = blankType;
		addQuerys("blankType", blankType);
	}
	public String getBlankType() {
		return blankType;
	}
	
	public void setCreditLimit(Double creditLimit) {
		this.creditLimit = creditLimit;
		addQuerys("creditLimit", creditLimit);
	}
	public Double getCreditLimit() {
		return creditLimit;
	}
	
	public void setRepaymentAmount(Double repaymentAmount) {
		this.repaymentAmount = repaymentAmount;
		addQuerys("repaymentAmount", repaymentAmount);
	}
	public Double getRepaymentAmount() {
		return repaymentAmount;
	}
	
	public void setBillAmount(Double billAmount) {
		this.billAmount = billAmount;
		addQuerys("billAmount", billAmount);
	}
	public Double getBillAmount() {
		return billAmount;
	}
	
	public void setCustomerPrincipal(Double customerPrincipal) {
		this.customerPrincipal = customerPrincipal;
		addQuerys("customerPrincipal", customerPrincipal);
	}
	public Double getCustomerPrincipal() {
		return customerPrincipal;
	}
	
	public void setBillDay(String billDay) {
		this.billDay = billDay;
		addQuerys("billDay", billDay);
	}
	public String getBillDay() {
		return billDay;
	}
	
	public void setRepaymentDay(String repaymentDay) {
		this.repaymentDay = repaymentDay;
		addQuerys("repaymentDay", repaymentDay);
	}
	public String getRepaymentDay() {
		return repaymentDay;
	}
	
	public void setTradePwd(String tradePwd) {
		this.tradePwd = tradePwd;
		addQuerys("tradePwd", tradePwd);
	}
	public String getTradePwd() {
		return tradePwd;
	}
	
	public void setQueryPwd(String queryPwd) {
		this.queryPwd = queryPwd;
		addQuerys("queryPwd", queryPwd);
	}
	public String getQueryPwd() {
		return queryPwd;
	}
	
//	public void setHandlingFeePoint(Double handlingFeePoint) {
//		this.handlingFeePoint = handlingFeePoint;
//		addQuerys("handlingFeePoint", handlingFeePoint);
//	}
//	public Double getHandlingFeePoint() {
//		return handlingFeePoint;
//	}
//	
//	public void setChargeDate(String chargeDate) {
//		this.chargeDate = chargeDate;
//		addQuerys("chargeDate", chargeDate);
//	}
//	public String getChargeDate() {
//		return chargeDate;
//	}
//	
//	public void setMerchantName(String merchantName) {
//		this.merchantName = merchantName;
//		addQuerys("merchantName", merchantName);
//	}
//	public String getMerchantName() {
//		return merchantName;
//	}
//	
//	public void setMerchantFee(Double merchantFee) {
//		this.merchantFee = merchantFee;
//		addQuerys("merchantFee", merchantFee);
//	}
//	public Double getMerchantFee() {
//		return merchantFee;
//	}
//	
//	public void setPayCardCount(Integer payCardCount) {
//		this.payCardCount = payCardCount;
//		addQuerys("payCardCount", payCardCount);
//	}
//	public Integer getPayCardCount() {
//		return payCardCount;
//	}
//	
//	public void setHandlingFee(Double handlingFee) {
//		this.handlingFee = handlingFee;
//		addQuerys("handlingFee", handlingFee);
//	}
//	public Double getHandlingFee() {
//		return handlingFee;
//	}
//	
//	public void setPayCardAmount(Double payCardAmount) {
//		this.payCardAmount = payCardAmount;
//		addQuerys("payCardAmount", payCardAmount);
//	}
//	public Double getPayCardAmount() {
//		return payCardAmount;
//	}
//	
//	public void setArrivalAmount(Double arrivalAmount) {
//		this.arrivalAmount = arrivalAmount;
//		addQuerys("arrivalAmount", arrivalAmount);
//	}
//	public Double getArrivalAmount() {
//		return arrivalAmount;
//	}
//	
//	public void setPayCardTime(String payCardTime) {
//		this.payCardTime = payCardTime;
//		addQuerys("payCardTime", payCardTime);
//	}
//	public String getPayCardTime() {
//		return payCardTime;
//	}
//	
//	public void setArrivalAmountTime(String arrivalAmountTime) {
//		this.arrivalAmountTime = arrivalAmountTime;
//		addQuerys("arrivalAmountTime", arrivalAmountTime);
//	}
//	public String getArrivalAmountTime() {
//		return arrivalAmountTime;
//	}
//	
//	public void setArrivalAmountCard(String arrivalAmountCard) {
//		this.arrivalAmountCard = arrivalAmountCard;
//		addQuerys("arrivalAmountCard", arrivalAmountCard);
//	}
//	public String getArrivalAmountCard() {
//		return arrivalAmountCard;
//	}
	
	/**
	 * 根据model构建vo
	 * 
	 * @author max
	 * @return
	 */
	public static AccountItem createItem(Account account) {
		AccountItem accountItem = null;
		if(account!=null) {
			accountItem = new AccountItem();
			BeanUtils.copyProperties(accountItem, account);
			//自定义属性设置填充
		}
		
		return accountItem;
	}
	/**
	 * 根据model集合创建vo集合
	 * 
	 * @author max
	 * @return
	 */
	public static List<AccountItem> createItems(List<Account> accounts) {
		List<AccountItem> accountItems = new ArrayList<AccountItem>();
		for (Account account : accounts) {
			accountItems.add(createItem(account));
		}
		return accountItems;
	}
}
